﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using PriceMaintenanceDAO = BotonJXC.DAO.PriceMaintenanceDAO;
using NHibernate.Criterion;
using BotonJXC.DAO;
using BotonJXC.Entity;
namespace BotonJXC.BLL
{
    public class PriceMaintenanceBll : BaseBLL<PriceMaintenanceDAO, PriceInfo, int>
    {
        public PriceMaintenanceBll() { }
        PriceMaintenanceDAO pmDao = new PriceMaintenanceDAO();
        public bool savePriceMaintenanc(PriceInfo PriceInfo)
        {
            try
            {
                pmDao.savePriceMaintenanc(PriceInfo);
                return true;
            }
            catch (Exception)
            {
                return false;
                throw;


            }

        }
        public bool updatePriceMaintenanc(PriceInfo PriceInfo)
        {
            try
            {
                pmDao.updatePriceMaintenanc(PriceInfo);
                return true;
            }
            catch (Exception)
            {
                throw;
            }
        }

        public bool delPriceMaintenanc(PriceInfo PriceInfo)
        {
            try
            {
                pmDao.delPriceMaintenanc(PriceInfo);
                return true;
            }
            catch (Exception)
            {
                throw;
            }
        }
        public PageModel<PriceInfo> findAllPriceMaintenanc(string PriceInfoSn, string CreaterName, string CreateTimeOne, string CreateTimeTwo, string Status, int start, int count)
        {
           return pmDao.FindPage(PriceInfoSn, CreaterName, CreateTimeOne, CreateTimeTwo, Status, start, count);
        }

        public PriceInfo findPriceMaintenanc(int PriceInfoProsId)
        {
            return pmDao.Get(PriceInfoProsId);
        }

        public IList<PriceInfo> findAllOrders()
        {
        
           return  base.FindAll();
        
        }
    }
}
